package com.daodaofun.springboot.controller;

import com.daodaofun.springboot.MyBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @Autowired
    private MyBean myBean;

    @RequestMapping("hello")
    public String hello(){
        System.out.println(myBean.getName());
        return " Hello Spring Boot2";
    }
}
